package com.springboot.service;

import com.springboot.bean.Student;
import com.springboot.bean.User;
import com.springboot.bean.UserInfo;
import com.springboot.bean.UserShoir;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.CachePut;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;
@CacheConfig(cacheNames = "student")
public interface StudentService {
	int add(Student student);
    int update(Student student);
    int deleteBysno(String sno);
    Student queryStudentBySno(String sno);
    List<User> getAllUsers();
    @Cacheable(key = "#id.toString()")
    UserInfo selectUser(String id);
    @CachePut(key = "#user.id.toString()")
    UserInfo updateUser(UserInfo user);
    @CacheEvict(key = "#id.toString()")
    int deleteUser(String id);
    int addUserInfo(UserInfo user);
    void asyncMethod();
    void syncMethod();

}
